package utils
{
	import flash.display.Sprite;
	/** 
	 * @author Serge
	 * Base class for all Utils
	 */	
	public class Component extends Sprite
	{	
		private var cover:Sprite;
		
		public function clear():void
		{
			for (var i:uint = numChildren; i > 0; i--)
			{
				removeChildAt(0);
			}
		}
		
		public function startEdit():void
		{
			cover = new Sprite();
			cover.graphics.beginFill(0xFFFFFF, 0.35);
			cover.graphics.lineStyle(1, 0xCCCCCC);
			cover.graphics.drawRect(0, 0, width, height);
			cover.graphics.endFill();
			cover.graphics.moveTo(0, 0);
			cover.graphics.lineTo(width, height);
			cover.graphics.moveTo(0, height);
			cover.graphics.lineTo(width, 0);
			addChild(cover);
		}
		
		public function stopEdit():void
		{
			cover.graphics.clear();
			cover = null;
		}
	}
}